﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace JustTest.Models
{
    public class Category
    {
        public int Id { get; set; }

        [StringLength(25, ErrorMessage = "Category name must be 25 characters or less in length.")]
        [Required(ErrorMessage = "Category name is required.")]
        public string Name { get; set; }
        public virtual ICollection<Test> Tests { get; set; }

        public Category()
        {
            this.Tests = new HashSet<Test>();
        }
    }
}